<html>
<head><meta charset="utf-8"><title>mdbook handling of `compile_fail` annotation? · t-lang/doc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/index.html">t-lang/doc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/mdbook.20handling.20of.20.60compile_fail.60.20annotation.3F.html">mdbook handling of `compile_fail` annotation?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="245263467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/mdbook%20handling%20of%20%60compile_fail%60%20annotation%3F/near/245263467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Yu [they/she] <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/mdbook.20handling.20of.20.60compile_fail.60.20annotation.3F.html#245263467">(Jul 08 2021 at 01:26)</a>:</h4>
<p>i'm not sure there's a better place to ask other than opening an issue, but i've noticed that when building the Reference, mdbook seems to ignore <code>compile_fail</code> flag in a code fence when rendering HTML, if it's preceded by <code>rust</code> (like almost all the instances in the Reference)</p>
<div class="codehilite"><pre><span></span><code>```rust,compile_fail
</code></pre></div>
<p>acts just like</p>
<div class="codehilite"><pre><span></span><code>```rust
</code></pre></div>
<p>while</p>
<div class="codehilite"><pre><span></span><code>```compile_fail
</code></pre></div>
<p>correctly omits the playground link. has anyone else noticed this?</p>



<a name="245264941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/237824-t-lang/doc/topic/mdbook%20handling%20of%20%60compile_fail%60%20annotation%3F/near/245264941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Yu [they/she] <a href="https://rust-lang.github.io/zulip_archive/stream/237824-t-lang/doc/topic/mdbook.20handling.20of.20.60compile_fail.60.20annotation.3F.html#245264941">(Jul 08 2021 at 01:56)</a>:</h4>
<p>oh. from keywords.html, from a code block that was only flagged <code>compile_fail</code>:</p>
<div class="codehilite" data-code-language="HTML"><pre><span></span><code><span class="p">&lt;</span><span class="nt">code</span> <span class="na">class</span><span class="o">=</span><span class="s">"language-compile_fail hljs"</span><span class="p">&gt;</span>
</code></pre></div>
<p>vs a code block in items/generics.html that's flagged <code>rust,compile_fail</code>:</p>
<div class="codehilite" data-code-language="HTML"><pre><span></span><code><span class="p">&lt;</span><span class="nt">code</span> <span class="na">class</span><span class="o">=</span><span class="s">"language-rust compile_fail edition2018 hljs hide-boring"</span><span class="p">&gt;</span>
</code></pre></div>
<p>so it's not exactly removing the playground link because of <code>compile_fail</code>; it was failing to tag it as "rust", so there was no playground link.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>